# 编译阶段
FROM node:10.24.1-alpine3.11 AS build
WORKDIR /app

# 先复制 package 文件
COPY package*.json ./
RUN npm config set registry https://registry.npmmirror.com && \
    npm install

# 再复制其他所有文件
COPY . .

ENV PORT=5142
# 暴露端口
EXPOSE ${PORT}

ENTRYPOINT ["npm", "run", "test"]

LABEL 原项目地址="https://github.com/HenryDavidZhu/MazeBattles.com"
LABEL 镜像制作者="https://space.bilibili.com/17547201"
LABEL GitHub主页="https://github.com/Firfr/maze_battles"
LABEL Gitee主页="https://gitee.com/firfe/maze_battles"


# docker buildx build --platform linux/amd64 --tag firfe/maze_battles:2025.09.11 --load .
# docker buildx build --platform linux/arm64 --tag firfe/maze_battles:2025.09.11-arm64 --load .
